package com.mingqijia.gassafety.job;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 定时任务
 *
 */
@EnableScheduling
@EnableApolloConfig
@SpringBootApplication(scanBasePackages = {"com.mingqijia.gassafety.job",
        "com.mingqijia.gassafety.shared", "com.mingqijia.gassafety.db", "com.mingqijia.gassafety.authority"},
        exclude = DruidDataSourceAutoConfigure.class)
@MapperScan("com.mingqijia.gassafety.db.mapper.**,com.mingqijia.gassafety.db.hangzhou.mapper.**")
@EnableAsync
@EnableFeignClients
public class GasSafetyJobApplication {

    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(GasSafetyJobApplication.class);
        springApplication.addListeners(new ApplicationPidFileWriter());
        springApplication.run(args);
    }

}
